/*
 * File Name：Constants.java
 * Copyright：Copyright 2008-2014 CiWong.Inc. All Rights Reserved.
 * Description： Constants.java
 * Modify By：RES-KUNZHU
 * Modify Date：2014-5-27
 * Modify Type：Add
 */
package com.ciwong.epaper.utils;

import android.graphics.Color;

/**
 * 常量类
 *
 * @author RES-KUNZHU
 * @version ciwong v.1.0 2014-5-27
 * @since ciwong v.1.0
 */
public class Constants
{
    public static final int LIMIT_GOLD = 2000;

    public static final int LIMIT_TIME = 2;

    public static final int LIMIT_CANDY = 10;

    public static final float NIGHT_NUM = 0.05f;

    /**
     * 表情大小
     */
    public static final int DEFAULT_FACE_SIZE = 18;

    // 测试
    // public static final String WEBSOCKET_URL = "ws://192.168.2.228:8181";

    // public static final String WEBSOCKET_URL = "ws://47.94.78.25:8181";
    /**
     * ciwong头像地址
     */
    public static final String PICTUR_RULE = "http://rimg2.ciwong.net/cwf";

    /**
     * ciwong头像地址
     */
    public static final String AVATAR_RULE = "http://avatar.ciwong.net/";

    /**
     * 使用时注意还有添加
     */
    public static final String RES_SCHEME_NEW = "res:///";

    /**
     * 使用时注意还有添加“/”
     */
    public static final String RES_SCHEME = "res://";

    public static final String FILE_SCHEME = "file://";

    /**
     * 微信登录APP_ID
     */
    public static final String WEIXIN_APP_ID = "wx5e28549ba9cec067";

    /**
     * 微信支付APP_ID
     */
    public static final String WEIXIN_PAY_APP_ID = "wx6209940d9c618dfc";

    /**
     * QQ登录测试ID
     */
    public static final String QQ_APP_ID = "1104979535";

    /**
     * 微博登录测试ID
     */
    public static final String WEIBO_APP_ID = "471523749";

    // 471523749 1104752217

    /**
     * 当前 DEMO 应用的回调页，第三方应用可以使用自己的回调页。
     *
     * <p>
     * 注：关于授权回调页对移动客户端应用来说对用户是不可见的，所以定义为何种形式都将不影响， 但是没有定义将无法使用 SDK 认证登录。
     * 建议使用默认回调页：https://api.weibo.com/oauth2/default.html
     * </p>
     */
    public static final String REDIRECT_URL = "http://www.sina.com";

    /**
     * Scope 是 OAuth2.0 授权机制中 authorize 接口的一个参数。通过 Scope，平台将开放更多的微博
     * 核心功能给开发者，同时也加强用户隐私保护，提升了用户体验，用户在新 OAuth2.0 授权页中有权利 选择赋予应用的功能。
     *
     * 我们通过新浪微博开放平台-->管理中心-->我的应用-->接口管理处，能看到我们目前已有哪些接口的 使用权限，高级权限需要进行申请。
     *
     * 目前 Scope 支持传入多个 Scope 权限，用逗号分隔。
     *
     * 有关哪些 OpenAPI 需要权限申请，请查看：http://open.weibo.com/wiki/%E5%BE%AE%E5%8D%9AAPI
     * 关于 Scope 概念及注意事项，请查看：http://open.weibo.com/wiki/Scope
     */
    public static final String SCOPE = "email,direct_messages_read,direct_messages_write,"
            + "friendships_groups_read,friendships_groups_write,statuses_to_me_read,"
            + "follow_app_official_microblog," + "invitation_write";

    /**
     * 请求所需clientId
     */
    public static final int CLIENT_ID = 100032;

    /**
     * 请求的client密码
     */
    public static final String CLIENT_SECRECT = "606f1341ec8d4cff0423830e8f0a7f51";

    /**
     * 设备类型
     */

    public static final int DEVICE_TYPE = 5;

    /**
     * 普通通知
     */
    public static final String FLAG_CLEAR_NOTIFY_AUTO_CANCEL = "flag_auto_cancel";

    /**
     * 常驻通知
     */
    public static final String FLAG_CLEAR_NOTIFY_ONGOING_EVENT = "flag_ongoing_event";

    /**
     * 全部
     */
    public static final String FLAG_CLEAR_NOTIFY_ALL = "all";

    /**
     * 刷新关系链时长
     */
    public static final String FLAG_REFRESH_LAST_TIME = "FLAG_REFRESH_LAST_TIME";

    /**
     * 拉取离线通知时长
     */
    public static final String FLAG_REFRESH_MSG_LAST_TIME = "FLAG_REFRESH_MSG_LAST_TIME";

    /**
     * shareprefrence 当前登录用户id标示
     */
    public static final String SHARE_PRE_CURR_LOGIN_USER = "SHARE_PRE_CURR_LOGIN_USER";

    // public static final String SHARE_PRE_CURR_LOGIN_STUDENT =
    // "SHARE_PRE_CURR_LOGIN_STUDENT";

    /**
     * 刷新学伴备注名时长
     */
    public static final String FLAG_REFRESH_REMARK_TIME = "FLAG_REFRESH_REMARK_TIME";

    /**
     * 本地缓存学伴备注名时间
     */
    public static final String FLAG_UPDATE_REMARK_TIME = "FLAG_UPDATE_REMARK_TIME";

    /**
     * 刷新学伴备注名时长
     */
    public static final String FLAG_GET_REMARK_LIST = "FLAG_GET_REMARK_LIST";

    /**
     * 弹窗框提示信息文字大小
     */
    public static final int DIALOG_MESSAGE_TEXTSIZE = 16;

    /**
     * 网络字符串编码
     */
    public static final String ECODING = "utf-8";

    /**
     * 自动登录类型标识
     */
    public static final String AUTO_LOGIN_TYPE = "AUTO_LOGIN_TYPE";

    /**
     * 保存自动用户名
     */
    public static final String AUTO_LOGIN_USERID = "AUTO_LOGIN_USERID";

    /**
     * 保存自动密码
     */
    public static final String AUTO_LOGIN_PASSWORD = "AUTO_LOGIN_PASSWORD";

    public static final String USER_PASSWORD = "USER_PASSWORD";

    public static final String USER_NEW_TASK = "USER_NEW_TASK";

    /**
     * 文件图片前缀
     */
    public static final String IMG_FILE_PREFIX = "file://";

    /**
     * 地址数据库的名称
     */
    public static final String ADDRESS_DB = "address.db";

    /**
     * CWPatByPat SO库地址
     */
    public static final String CWPATBYPAT_SO = "src/main/jniLibs/armeabi-v7a/libCWPatByPat.so";

    /**
     * 文件同步锁
     */
    public static final String FILE_ASYNC_TAG = "FILE_ASYNC_TAG";

    /**
     * 发送
     */
    public static final int SEND = 1;

    /**
     * 涂鸦
     */
    public static final int GRAFF = 2;

    /**
     * p1p
     */
    public static final int PAT_PAT = 3;

    /**
     * 100
     */
    public static final int ONE_HUNDERD = 100;

    /**
     * 50
     */
    public static final int WIDTH_FIFITY = 50;

    /**
     * 录音采样率
     */
    public static final int SAMPLERATE = 8000;

    /**
     * 用户所在学校sharedpreference标识<b style="color:red">(使用时需要加入userId)</b>
     */
    public static final String SP_FLAG_ALL_USER_SCHOOL = "SP_FLAG_ALL_USER_SCHOOL";

    /**
     * 用户默认选择学校sharedpreference标识<b style="color:red">(使用时需要加入userId)</b>
     */
    public static final String SP_FLAG_USER_SCHOOL = "SP_FLAG_USER_SCHOOL";

    /**
     * 用户是否获取完全部获取关系链sharedpreference标识<b style="color:red">(使用时需要加入userId)</b>
     */
    public static final String SP_FLAG_ISNEED_REFRESH_ALL = "SP_FLAG_ISNEED_REFRESH_ALL";

    /**
     * 用户获取离线消息sharedpreference标识<b style="color:red">(使用时需要加入userId)</b>
     */
    public static final String SP_FLAG_OFFLINE_NOTIFICATION_TIME = "SP_FLAG_OFFLINE_NOTIFICATION_TIME";

    /**
     * 公众号菜单sharedpreference标识<b style="color:red">(使用时需要加入userId、publicId)</b>
     */
    public static final String SP_FLAG_PUBLIC_ACCOUNT_MENU = "SP_FLAG_PUBLIC_ACCOUNT_MENU";

    /**
     * 登录时密码错误
     */
    public static final int LOGIN_ERROR_CODE_PWD_ERROR = 10004;

    /**
     * 登录时账号错误
     */
    public static final int LOGIN_ERROR_CODE_ACCOUNT_ERROR = 110006;

    public static final int NO_ACCOUNT_ERROR = 4101;

    public static final int ACCOUNT_NOT_USE_ERROR = 4120;

    /**
     * 登录时超时
     */
    public static final int LOGIN_ERROR_CODE_TIMEOUT_ERROR = 100008;

    /**
     * key
     */
    public static final String KEY = "open.ciwong.com";

    /**
     * 开始透明度
     */
    public static final int FROM_ALPHA = 0;

    /**
     * 结束透明度
     */
    public static final int TO_ALPHA = 100;

    /**
     * 透明度动画效果显示时间
     */
    public static final int ALPHA_DURATION_MS = 1500;

    /**
     * 动画显示时间
     */
    public static final int ANIM_DURATION_MS = 200;

    /**
     * 图片渐显的时间
     */
    public static final int DURATION_MILLIS = 500;

    /**
     * 照相缩放图片最大高度
     */
    public static final int MATRIX_IMG_MAX_HEIGHT = 500;

    /**
     * 是否具有拍一拍权限
     */
    public static final String SHARED_PREP_TAKE_PHTOT_RIGHT = "TAKE_PHTOT_RIGHT";

    /**
     * 当前时间
     */
    public static final String SHARED_PREP_TAKE_PHTOT_RIGHT_LEFT = "SHARED_PREP_TAKE_PHTOT_RIGHT_CUR";

    /**
     * 是否提示，是否是好友
     */
    public static final String SHARED_PREP_NOTIY_IS_FRIEND = "SHARED_PREP_NOTIY_IS_FRIEND";

    /**
     * 是否提示，是否是好友,是否屏蔽消息
     */
    public static final String SHARED_PREP_NOTIY_IS_FRIEND_SHIELD = "SHARED_PREP_NOTIY_IS_FRIEND_SHIELD";

    public static final String SHARED_PREP_LAST_CODE = "SHARED_PREP_LAST_CODE";

    public static final String SHARED_PREP_FIRST_LOGIN = "SHARED_PREP_ACTIVITIES_SHOW1";

    public static final String SHARED_PREP_FIRST_IDENTITY = "SHARED_PREP_ACTIVITIES_IDENTITY";

    /**
     * SDK版本号
     */
    public static final int SDK_VERSION = 14;

    /**
     * 习网条款
     */
    public static final String RULE = "file:///android_asset/rule.html";

    /**
     * 用户头像圆角大小
     */
    public static final float CHAT_IMAGE_ROUND = 20.0f;

    /**
     * 说说最大长度
     */
    public static final int MAX_TEXT_LENGTH = 140;

    /**
     * 刷新群组
     */
    public static final String INTENT_FLAT_REFRESH_GROUP = "INTENT_FLAT_REFRESH_GROUP";

    /**
     * 刷新最近
     */
    public static final String INTENT_FLAT_REFRESH_LATER = "INTENT_FLAT_REFRESH_LATER";

    /**
     * 强制下线
     */
    public static final String ACTION_OFF_LINE = "ACTION_OFF_LINE";

    /**
     * token失效
     */
    public static final String TOKEN_UNAUTHORIZED = "TOKEN_UNAUTHORIZED";

    /**
     * TOKEN
     */
    public static final String TOKEN = "TOKEN_MOBILE_TP";

    /**
     * 验证信息
     */
    public static final String VERITIFY_INFO = "TP_MOBILE_VERTIFY_INFO";

    /**
     * 用户头像圆角大小
     */
    public static final float USER_FACE_ROUND = 0.05f;

    public static final String CLASS_SCHOOL_AVATAR = "class_school_avatar";

    /**
     * 改变身份key 使用时加userid
     */
    public static final String IDENTITY_CHANGE = "IDENTITY_CHANGE";

    public static final String INVITATION_REFRESH_TIME = "INVITATION_REFRESH_TIME";

    public static final String INVITATION_FAMILY_REFRESH_TIME = "INVITATION_FAMILY_REFRESH_TIME";

    public static final String OWN_STUDENT_INFO = "OWN_STUDENT_INFO";

    public static final String ALARM_EXTRA_BUNDLE = "ALARM_EXTRA_BUNDLE";

    /**
     * 书桌图像圆角大小
     */
    public static final float DESK_IMG_ROUND = 0.05f;

    private static final int DEFALUT_FAILED_COLOR = Color.parseColor("#ececec");

    /**
     * 是否声音提醒 sharedpreference 标示
     */
    private static final String PREP_FLAG_SETTING_VOICE = "PREP_FLAG_SETTING_VOICE";

    /**
     * 是否接受群消息 sharedpreference 标示
     */
    private static final String PREP_FLAG_SETTING_GROUP = "PREP_FLAG_SETTING_GROUP";

    /**
     * 是否设置代理
     */
    private static final String PREP_FLAG_SETTING_PROXY = "PREP_FLAG_SETTING_PROXY";

    /**
     * 是否在通知栏显示图标 sharedpreference 标示
     */
    private static final String PREP_FLAG_SETTING_NOTIFY = "PREP_FLAG_SETTING_NOTIFY";

    /**
     * 是否震动提醒 sharedpreference 标示
     */
    private static final String PREP_FLAG_SETTING_VERB = "PREP_FLAG_SETTING_VERB";

    public static final String USER_GOLD_AMOUNT = "user_gold_amount";
    // /**
    // * 匹配URL正则表达式(可匹配域名地址和IP地址)
    // */
    // public static final String URL_PATTERN =
    // "(?:(http://|ftp://|https://|www){0,1}[a-zA-Z0-9\\_\\/\\&\\%\\-\\?\\=\\.]+\\.(com|net|cn|me|tw|fr|org)[a-zA-Z0-9\\_\\#\\/\\&\\%\\-\\?\\=\\.]*)|(?:(http://|ftp://|https://|www){1}[a-zA-Z0-9\\_\\/\\&\\%\\-\\?\\=\\.]+(.com|.net|.cn|.me|.tw|.fr|.org){0,1}[a-zA-Z0-9\\_\\#\\/\\&\\%\\-\\?\\=\\.]*)";

    /**
     * Good characters for Internationalized Resource Identifiers (IRI). This
     * comprises most common used Unicode characters allowed in IRI as detailed
     * in RFC 3987. Specifically, those two byte Unicode characters are not
     * included.
     */
    public static final String GOOD_IRI_CHAR = "a-zA-Z0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF";

    /**
     * Regular expression to match all IANA top-level domains for WEB_URL. List
     * accurate as of 2011/07/18. List taken from:
     * http://data.iana.org/TLD/tlds-alpha-by-domain.txt This pattern is
     * auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py
     */
    public static final String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:"
            + "(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
            + "|(?:biz|b[abdefghijmnorstvwyz])"
            + "|(?:cat|com|coop|c[acdfghiklmnoruvxyz])" + "|d[ejkmoz]"
            + "|(?:edu|e[cegrstu])" + "|f[ijkmor]"
            + "|(?:gov|g[abdefghilmnpqrstuwy])" + "|h[kmnrtu]"
            + "|(?:info|int|i[delmnoqrst])" + "|(?:jobs|j[emop])"
            + "|k[eghimnprwyz]" + "|l[abcikrstuvy]"
            + "|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])"
            + "|(?:name|net|n[acefgilopruz])" + "|(?:org|om)"
            + "|(?:pro|p[aefghklmnrstwy])" + "|qa" + "|r[eosuw]"
            + "|s[abcdeghijklmnortuvyz]"
            + "|(?:tel|travel|t[cdfghjklmnoprtvwz])" + "|u[agksyz]"
            + "|v[aceginu]" + "|w[fs]"
            + "|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)"
            + "|y[et]" + "|z[amw]))";

    public static final String URL_PATTERN = "((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
            + "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
            + "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
            + "((?:(?:[" + GOOD_IRI_CHAR + "][" + GOOD_IRI_CHAR
            + "\\-]{0,64}\\.)+" // named host
            + TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL + "|(?:(?:25[0-5]|2[0-4]" // or
            // ip
            // address
            + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]"
            + "|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1]"
            + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
            + "|[1-9][0-9]|[0-9])))" + "(?:\\:\\d{1,5})?)" // plus option port
            // number
            + "(\\/(?:(?:[" + GOOD_IRI_CHAR + "\\;\\/\\?\\:\\@\\&\\=\\#\\~" // plus
            // option
            // query
            // params
            + "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?"
            + "(?:\\b|$)"; // and finally, a word boundary or end of

    /**
     * 请求码
     *
     * @author RES-KUNZHU
     */
    public class RequestCode
    {
        /**
         * 拍照
         */
        public static final int REQUEST_CODE_TAKE_PHOTO = 1;

        /**
         * 选择图片
         */
        public static final int REQUEST_CODE_CHOOSE_PIC = 2;

        /**
         * 裁剪图片
         */
        public static final int REQUEST_CODE_CROP_PIC = 3;

        /**
         * 浏览图片
         */
        public static final int REQUEST_CODE_SCAN_PIC = 4;

        /**
         * 录音
         */
        public static final int REQUEST_CODE_CHOOSE_AUDIO = 5;

        /**
         * 购买版权
         */
        public static final int REQUEST_CODE_COPYRIGHT = 6;

        /**
         * 已发送
         */
        public static final int REQUEST_CODE_SEND_OK = 7;

    }

    /**
     * 显示类型
     */
    public static final String INTENT_FLAG_TYPE = "type";

}
